home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
PET
/
S-Super PET
/
(s)tl.d64
/
SCROLL.ASM
< prev
next >
Wrap
Assembly Source File
|
2009-01-18
|
4KB
|
138 lines
; Scroll as of 03/24/84
; 'scroll' for bank $F
; 'scroll' -- reconstructed from binary by T.M. Peterson
; 6/19/83
; Altered 7/01/83 for better print & serial buffering
; " 7/06/83 for warm start after accid. lang. exit
; " 7/10/83 for STOP during RVS pause
; 9/24/83 start FScroll--delete serial buffer.
; 11/20/83 " GScroll
; 11/20/83 'Fixed' doubled lines in scroll freeze.
; 3/04/84 Tie together GScroll and P.Ruud's keyboard patch.
xref TGetCurs_,TGetChar_,ScrnDmpType
xref PrintF_,ConBInt_,Ruud_key,Scroll_Stop,Insert,Altbffr
xdef scroll_init,scroll_conn,scroll_discon
norm_IRQ equ $DE0B ;Normal SPET IRQ ROM routine
trans equ $128 ;flag for kybd decode
; Following code is assumed to be in bank-switched memory
; and therefore needs no protection from over-writing by
; user programs.
scroll_init equ * ;Set up pointers for patches
clr Scroll_Stop ;First clear flags
clr Insert
clr Altbffr
ldb #1 ;Init. spec. key trans funct.
stb trans
ldy #$600-6 ;Put pointer in unused part of vector table
sty $5C7 ;Put pointer in table
ldd #$BDB0 ; 'JSR $B0-'
std ,y++
ldd #$090F ; '09 Bank 15'
std ,y++
ldd #Toutput_patch
std ,y
lbsr scrndmp_init ; Find out what printer.
bsr scroll_conn ; Turn on patch
CLR $32 ;flag done
ldd #hello ;print 'hello' msg
jmp printf_
hello fcb 12,10,10
fcc " -- S c r o l l (Version 03/24/84) -- by T.M. Peterson"
fcb $D,$D
fcc " Now Activated."
fcb $D,$D,0
scroll_conn equ *
ldb #7 ;Set Toutput trap flag
stb $585
sei ;NO IRQ's right now.
jsr Ruud_key ;Connect Paul's kybd routine
cli
rts
scroll_discon equ *
clr $585 ;Clear Toutput flag
ldd #norm_IRQ
std $108 ;Clear bank-sw. IRQ
rts
Toutput_patch equ *
ldb 3,s ;Get char about to print
cmpb #$D ;Is CR?
if eq
tst Scroll_Stop ;Flag set?
if ne ;yes
loop
tst Scroll_Stop
until eq ;wait for flag cleared.
endif
endif
rts ;Go print char
scrndmp_init equ *
loop ;Most of us will substitute:
ldd #prquery ;
jsr printf_ ; ldb #our_type
jsr tgetchar_ ; stb ScrnDmpType
cmpb #$d ; rts
if eq ;
clrb ; for the code at left.
else
pshs b
loop
jsr tgetchar_
cmpb #$d
until eq
puls b
subb #'0
endif
stb ScrnDmpType
quif eq
decb
quif eq
decb
until eq
ldd #lfquery
jsr printf_
jsr tgetchar_
cmpb #'y
if eq
lda #$80
else
clra
endif
ora ScrnDmpType
sta ScrnDmpType
loop
cmpb #$d
quif eq
jsr tgetchar_
endloop
rts
prquery equ *
fcc "%nScreen dumps to: 0) 'ieee4', 1) 'printer', or 2) 'serial'%n"
fcc "(0/1/2/CR=0)?"
fcb $d,0
lfquery equ *
fcc "%nRequires linefeeds (y/n/CR=n)?"
fcb $d,0
end